package cn.tedu.mm.front.account.dao.persist.repository.impl;

import cn.tedu.mm.front.account.dao.persist.mapper.UserInfoMapper;
import cn.tedu.mm.front.account.dao.persist.repository.IUserInfoRepository;
import cn.tedu.mm.front.account.pojo.entity.UserInfo;
import cn.tedu.mm.front.account.pojo.vo.UserInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class UserInfoRepositoryImpl implements IUserInfoRepository {
    @Autowired
    private UserInfoMapper userInfoMapper;
    @Override
    public UserInfoVO getUserInfo(Long id) {
        return userInfoMapper.getUserInfo(id);
    }

    @Override
    public int updatePassword(UserInfo userInfo) {
        return userInfoMapper.updateById(userInfo);
    }

    @Override
    public int updateInfo(UserInfo userInfo) {
        return userInfoMapper.updateById(userInfo);
    }
}
